<?php
/**
 * Created by .
 * User: luogan
 * Date: 2022/1/14
 */

namespace app\model;

use hg\apidoc\annotation\Field;
class AdminLogModel extends BaseModel
{
    protected $table = 'api_admin_log';
    protected $pk = 'id';
    protected $autoWriteTimestamp=true;
    protected $hidden=['delete_time'];


    /**
     * 获取操作日志详情
     * @Field("id,admin_id,username,ip,remark,action,create_time,update_time")
     */
    public function getAdminLog(){}


    /**
     * 获取操作日志列表
     * @Field("id,admin_id,username,ip,remark,action,create_time,update_time")
     */
    public function getList($data){
        $result = $this->withSearch($this->searchFields($data),$this->searchData($data))
            ->paginate($this->getLimit($data));
        return $result;
    }
}
